<!DOCTYPE html>
<html>
	<head th:replace="/mobile/common::head(~{::custom_settings})">
		<th:block th:fragment="custom_settings">
			<title>顺山科技智慧生活服务平台</title>
			<link type="text/css" rel="stylesheet" th:href="@{{css}/mobile/merchant/main.css(css=${css})}"/>
		</th:block>
	</head>
	<body>
		<div class="wrapper">
			<header class="main-header">
				<div class="container_header">
					<div class="weui-heaher">
						<span class="weui-default">商户管理</span>
						<!-- <div class="weui_menu full_menu"><a class="weui-toggler weui-sidebar-toggler"><i id="weui-mini" class="fa fa-bars"></i><i class="fa fa-search"></i></a></div> -->
					</div>
					<!-- <div class="weui-right">
						<div class="weui-wrap-info">
							<i class="fa fa-envelope"></i>
							<span class="weui-badge"></span>
						</div>
						<div class="weui-dropdown-toggle"><img th:src="@{{image}/mobile/member/touxiang.png(image=${image})}"/></div>
					</div> -->
				</div>
			</header>
			<div class="weui-tab">
				  <div class="weui-navbar">
				    <a class="weui-navbar__item" href="javascript:void(0);" onclick="infoClick(0);">商户信息</a>
				    <a class="weui-navbar__item" href="javascript:void(0);" onclick="itemClick(1);">商品管理</a>
				    <a class="weui-navbar__item" href="javascript:void(0);" onclick="accountClick(2);">商户结算</a>
				    <a class="weui-navbar__item" href="javascript:void(0);" onclick="fundClick(3);">资金记录</a>
				  </div>
				  <div class="weui-tab__bd">
				  	<iframe id="merchantinfo" class="merchantinfo"></iframe>
				  </div>
			</div>
		</div>
		
		<!-- 结算详情 -->
		<div id="half" class='weui-popup__container popup-bottom'>
			<th:block th:fragment="info_refresh" th:if="${info}">
			<div class="weui-popup__overlay"></div>
				<div class="weui-popup__modal">
					<div class="toolbar">
						<div class="toolbar-inner">
						<a href="javascript:;" class="picker-button close-popups" th:if="${info.entitystate} eq '待处理' " th:onclick="'javascript:toback(\''+${info.entityid}+'\');'">撤销</a>
						<a href="javascript:;" class="picker-button close-popup">关闭</a>
						<h1 class="title">结算详情</h1>
						</div>
					</div>
					<div class="modal-content">
						<div class="weui-form-preview">
							<div class="weui-form-preview__hd">
								<label class="weui-form-preview__label">状态</label>
								<em class="weui-form-preview__value" th:text="${info.entitystate}"></em>
							</div>
							<div class="weui-form-preview__hd">
								<label class="weui-form-preview__label">结算类型</label>
								<em class="weui-form-preview__value" th:text="${info.settlementtype}"></em>
							</div>
							<div class="weui-form-preview__hd">
								<label class="weui-form-preview__label">结算金额</label>
								<em class="weui-form-preview__value">￥<label th:text="${info.settlementamount}"></label></em>
							</div>
							<div class="weui-form-preview__hd">
								<label class="weui-form-preview__label">申请时间</label>
								<em class="weui-form-preview__value" th:text="${info.applytime}"></em>
							</div>
							<div class="weui-form-preview__hd">
								<label class="weui-form-preview__label">撤销时间</label>
								<em class="weui-form-preview__value" th:text="${info.revoketime}"></em>
							</div>
							<div class="weui-form-preview__hd">
								<label class="weui-form-preview__label">付款类型</label>
								<em class="weui-form-preview__value" th:text="${info.paymenttype}"></em>
							</div>
							<div class="weui-form-preview__hd">
								<label class="weui-form-preview__label">付款时间</label>
								<em class="weui-form-preview__value" th:text="${info.paytime}"></em>
							</div>
							<div class="weui-form-preview__hd">
								<label class="weui-form-preview__label">处理人</label>
								<em class="weui-form-preview__value" th:text="${info.username}"></em>
							</div>
						</div>
					</div>
				</div>
			</th:block>
		</div>
		<!-- 结算详情 -->
		
		<!-- 资金记录详情 -->
		<div class='weui-screening-categories'>
	      <div class="weui-sc-content">
		        <div class="toolbar">
		          <div class="toolbar-inner">
		            <a href="javascript:close();" class="picker-button close-popup">关闭</a>
		            <h1 class="title">资金记录详情</h1>
		          </div>
		        </div>
		        <div class="modal-content" id="RecordDetail">
		        	<th:block th:fragment="RecordDetail" th:if="${recordDetail!=null}">
				        <div class="weui-form-preview">
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">状态</label>
						    <em class="weui-form-preview__value" th:text="${recordDetail.entitystate=1} ? '有效' : ''"></em>
						  </div>
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">记录类型</label>
						    <em class="weui-form-preview__value" th:text="${recordDetail.recordtype=1} ? '收入' : '支出'"></em>
						  </div>
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">变化原因</label>
						    <em class="weui-form-preview__value" th:text="${recordDetail.reaso}"></em>
						  </div>
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">原因描述</label>
						    <em class="weui-form-preview__value" th:text="${recordDetail.reasondesc}"></em>
						  </div>
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">记录总额</label>
						    <em class="weui-form-preview__value" th:text="'￥' + ${recordDetail.totalamount}"></em>
						  </div>
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">变化金额</label>
						    <em class="weui-form-preview__value" th:text="'￥' + ${recordDetail.changedamount}"></em>
						  </div>
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">提成费率</label>
						    <em class="weui-form-preview__value"th:text="${recordDetail.royaltyrate} + '%'"></em>
						  </div>
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">提成金额</label>
						    <em class="weui-form-preview__value" th:text="'￥' + ${recordDetail.royaltyamount}"></em>
						  </div>
						  <div class="weui-form-preview__hd">
						    <label class="weui-form-preview__label">记录时间</label>
						    <em class="weui-form-preview__value" th:text="${recordDetail.recordtime}"></em>
						  </div>
						 </div>
					 </th:block>
			 	</div>
	     </div>
	   </div>
	<!-- 资金记录详情 -->
	
	<!-- 资金记录筛选弹框 -->
	<div id="popup-capitalrecord-search" class="weui-popup__container popup-bottom">
		<div class="weui-popup__overlay"></div>
		<div class="weui-popup__modal">
			<div class="weui-cell-tk-title"><a class='close-popup'><i class="fa fa-close"></i></a></div>
			<div class="weui-cell-tk">
				<div class="weui-cell-tk-user">
					<div class="weui-cell-category-title"><h3>状态<i class="fa fa-angle-right"></i></h3></div>
					<a onclick="shaixuancheck(this,1)">收入</a>
					<a onclick="shaixuancheck(this,2)">支出</a>
				</div>
			</div>
			<div class="weui-cell-button">
				<a class="weui-cell-yellow-color" onclick="resetSearch('#popup-capitalrecord-search')">重&nbsp&nbsp置</a>
				<a class="weui-cell-red-color" onclick="submiRecordSearch()">确&nbsp&nbsp定</a>
			</div>
		</div>
	</div>
	<!-- 资金记录筛选弹框 -->
	
	<!-- 筛选弹框 -->
	<div id="shaixuan" class="weui-popup__container popup-bottom">
		<div class="weui-popup__overlay"></div>
		<div class="weui-popup__modal">
			<div class="weui-cell-tk-title"><a class='close-popup'><i class="fa fa-close"></i></a></div>
			<div class="weui-cell-tk">
				<div class="weui-cell-tk-user">
					<div class="weui-cell-category-title"><h3>状态<i class="fa fa-angle-right"></i></h3></div>
					<a onclick="shaixuancheck(this,12)">待处理</a>
					<a onclick="shaixuancheck(this,13)">处理中</a>
					<a onclick="shaixuancheck(this,14)">已撤销</a>
					<a onclick="shaixuancheck(this,15)">结算完成</a>
					<a onclick="shaixuancheck(this,16)">结算取消</a>
				</div>
			</div>
			<div class="weui-cell-button">
				<a class="weui-cell-yellow-color" onclick="resetSearch('#shaixuan')">重&nbsp&nbsp置</a>
				<a class="weui-cell-red-color" onclick="shaixuanSearch()">确&nbsp&nbsp定</a>
			</div>
		</div>
	</div>
	<!-- 筛选弹框 -->
	<script type="text/javascript" th:src="@{{js}/mobile/merchant/main.js(js=${js})}"></script>
	</body>
</html>